package com.nlx.notes.module.service.loan;

import com.nlx.notes.module.bean.dto.loan.*;
import com.nlx.notes.module.bean.vo.PageResultVo;
import com.nlx.notes.module.bean.vo.loan.*;

import java.util.List;

public interface LoanManageService {

    /**
     * 查询分页数据
     * @param loanSummaryQueryDTO 参数
     * @return LoanSummaryVO
     */
    PageResultVo<LoanSummaryVO> pageByCondition(LoanSummaryQueryDTO loanSummaryQueryDTO);

    /**
     * 保存借款信息
     * @param loanSummarySaveDTO 参数
     * @return LoanSummaryVO
     */
    LoanSummaryVO saveLoan(LoanSummarySaveDTO loanSummarySaveDTO);

    PageResultVo<LoanDetailPageVO> loanDetailPage(LoanDetailQueryDTO loanDetailQueryDTO);

    /**
     * 修改借款的数据
     * @param loanSummaryUpdateDTO 参数
     * @return LoanSummaryVO
     */
    LoanSummaryVO updateLoan(LoanSummaryUpdateDTO loanSummaryUpdateDTO);

    /**
     * 查询用户的借款概览信息
     * @param loanSummaryQueryDTO 参数
     * @return LoanOverviewVO
     */
    LoanOverviewVO loanOverView(LoanSummaryQueryDTO loanSummaryQueryDTO);

    /**
     * 获取某人的借款概览
     * @param loanDetailQueryDTO 参数
     * @return LoanDetailOverviewVO
     */
    LoanDetailOverviewVO loanDetailOverView(LoanDetailQueryDTO loanDetailQueryDTO);

    /**
     * 还款
     * @param repayDetailSaveDTO 参数
     * @return LoanDetailVO
     */
    LoanDetailVO saveRepay(RepayDetailSaveDTO repayDetailSaveDTO);

    /**
     * 删除还款详情中的数据
     * @param loanDeleteDTO 参数
     * @return LoanDetailVO
     */
    Boolean deleteLoanDetail(LoanDeleteDTO loanDeleteDTO);

    /**
     * 删除借款人的借款信息
     * @param loanDeleteDTO 参数
     * @return Boolean
     */
    Boolean deleteLoan(LoanDeleteDTO loanDeleteDTO);

    void saveLoanHis(List<LoanSaveHisDTO> list);
}
